package Demo2;

public class Main {
    public static void main(String[] args) {
        Student stu = new Student();
        Teacher tea;
        tea = new Teacher();
        tea.teacherNo="95001";
        tea.teacherName="李四";
        tea.gender="男";
        tea.password="123456";
        tea.userType="老师";
        tea.displayTeacherInfo();
        //.  对象名.属性名=value  syso（对象名.属性名）
        //   对象名.方法（[实际参数]）
        stu.stuNo = "6020242665";
        stu.stuName = "zhangsan";
        stu.gender = '男';

        Course coo = new Course();
        coo.courseNo = "0011";
        coo.courseName = "面向对象程序设计";
        coo.courseType="计科";
        coo.courseNum=88;
        coo.credit=2;
        coo.selectCourseMaxNum = 100;
        stu.displayStudentInfo();

        if (stu.selectCourse(coo, 60)) {
            System.out.println(stu.stuName + "选课成功！");
        }
    }
}
